﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace 第三章
{
    public partial class _3__10 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            string name = this.TXTname.Text;
            DateTime birthday;
            try
            {
                birthday = DateTime.Parse(this.InputBirthday.Value);
            }
            catch (Exception)
            {
                Response.Write("请重新输入年龄！");
                return;
            }
            UserInfo1 use = new UserInfo1(name, birthday);
            Response.Write(use.DecideAge());
        }
    }
}